package 剑指Offer55I.二叉树的深度;

public class Solution {
    public int maxDepth(TreeNode root) {
        if(root==null){
            return 0;
        }
        int left=maxDepth(root.left)+1;
        int right=maxDepth(root.right)+1;
        return left>right?left:right;
    }
}
